import socketserver模块

sk = socketserver模块.socket(type=socketserver模块.SOCK_DGRAM)

while True:
    inp = input('>>>').encode('utf-8')
    sk.sendto(inp, ('127.0.0.1', 9000))
    ret = sk.recv(1024)
    print(ret)
sk.close()
